if(MSVC)
    if(CMAKE_CL_64)
        set(arch x64)
        set(tbb_arch intel64)
    else()
        set(arch x86)
        set(tbb_arch ia32)
    endif()

    message("MSVC_VERSION = ${MSVC_VERSION}")

    if(MSVC_VERSION EQUAL 1400)
        set(runtime vc8)
        set(vs_version vs2005)
    elseif(MSVC_VERSION EQUAL 1500)
        set(runtime vc9)
        set(vs_version vs2008)
    elseif(MSVC_VERSION EQUAL 1600)
        set(runtime vc10)
        set(vs_version vs2010)
    elseif(MSVC_VERSION EQUAL 1700)
        set(runtime vc11)
        set(vs_version vs2012)
    elseif(MSVC_VERSION EQUAL 1800)
        set(runtime vc12)
        set(vs_version vs2013)
    elseif(MSVC_VERSION EQUAL 1900)
        set(runtime vc14)
        set(vs_version vs2015)
    elseif(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
        set(runtime vc15)
        set(vs_version vs2017)
    elseif(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS_EQUAL 1929)
        set(runtime vc16)
        set(vs_version vs2019)
        
    elseif(MSVC_VERSION GREATER_EQUAL 1930 AND MSVC_VERSION LESS_EQUAL 1939)
        set(runtime vc17)
        set(vs_version vs2022)
    endif()
endif()
message("vs version = ${vs_version}")
